← Course index · R314 System & Network
MMIBUT Métiers du Multimédia et de l'Internet · IUT de Vélizy

Lab · DNS: Domain Name System

Querying DNS records with nslookup, exploring the local cache and analysing DNS traffic with Wireshark.

TPnslookupWiresharkWindows

Objectives

Understand how the Internet naming system works and is organised. Study the different DNS records and the client–server dialogue.

Hardware & requirements

A Windows machine with the Wireshark protocol analyser installed. Wireshark must be launched with an administrator account.

Lab assessment: take notes or start your report, to be handed in during the assessment session. For each point, describe the manipulations performed on the workstation and attach screenshots.

01DNS querying

The command-line utility nslookup, available on all versions of Windows and Linux (or dig / host on Linux), gives information about domain names and their resource records (RRs). For interactive mode, launch nslookup from the command line (cmd), then type ? to get help on options.

A records
  1. What is the name and IP address of your default DNS server?
  2. What is the purpose of the A record?
  3. Find the IP address of the website www.paris.fr using nslookup.
  4. Why is the answer non-authoritative?
NS & SOA records
  1. What is the purpose of the NS record?
  2. Find the name and address of the name server(s) for the fr. domain.
  3. Find the name and address of the name server(s) for the paris.fr domain.
  4. Which is the authoritative name server for paris.fr? Check by sending a query to this server.
  5. What is the purpose of the SOA record?
  6. How could you find the authoritative server for paris.fr directly?
CNAME records
  1. What is the purpose of the CNAME record?
  2. What is the real name of the machine www.iut-velizy.uvsq.fr?
  3. Run nslookup www.france2.fr twice in a row. Why does this server have several IP addresses? Why does the order of the IPs change? From the real name, who is the host, and what is its role? Conclude.
PTR & MX records
  1. What is the purpose of the PTR record?
  2. What is the DNS name associated with the address 193.50.159.80?
  3. What is the purpose of the MX record? Which protocol uses this information?
  4. What is the mail server for the u-pem.fr domain?
DNS cache

On Windows, ipconfig /displaydns shows your machine's DNS cache.

  1. Run this command. What do you observe? What do the types correspond to? What is the role of the Time To Live (TTL)?
  2. Enter a non-existent URL in your browser (e.g. xxx.iut-velizy.uvsq.fr). Does a trace remain in the DNS cache?
  3. How do you clear the DNS cache?
  4. Clear your DNS cache, then display it again. What does the cache contain now?

02DNS analysis with Wireshark

  1. Start a capture with Wireshark while connecting to www.leboncoin.fr. Which filter did you use?
  2. Which transport protocol is used? Justify.
  3. What is the destination port number? Justify.
  4. What is the DNS query type (the RR type)?
  5. Is the query recursive? What is the other type of query, and how does it work?
  6. Are there additional RRs in the response? What do they correspond to?